package com.retallife.user.service.Video.Impl;

import com.retallife.user.dao.Video.VideoMapper;
import com.retallife.user.pojo.Video.VideoVo;
import com.retallife.user.service.Video.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VideoServiceImpl implements VideoService {

    @Autowired
    VideoMapper videoMapper;

    /**
     * 查询晒物
     * @return 是否查询成功
     */
    public List<VideoVo> FinaAllVideo() {
        return videoMapper.FinaAllVideo();
    }

    /**
     * 查询某人的晒物
     * @param userName
     * @return 是否查询成功
     */
    public List<VideoVo> FindVideo(String userName) {
        return videoMapper.FindVideo(userName);
    }

    /**
     * 删除某个晒物
     * @param userVideoName
     * @return 是否删除成功
     */
    public int DeleteVideo(String userVideoName) {
        return videoMapper.DeleteVideo(userVideoName);
    }
}
